import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Tabs from '@/components/Tabs'
import Layout from '@/pages/layout'
import User from '@/pages/organ/user'
import Organ from '@/pages/organ/organ'
import Area from '@/pages/organ/area'
import Menu from '@/pages/system/menu'
import Role from '@/pages/system/role'
import Dict from '@/pages/system/dict'
import Home from '@/pages/home'
import Login from '@/pages/login'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: Layout,
      children:[
        {
          path:'/home',
          name:'首页',
          component:Home
        },
        {
          path:'/organ/user',
          name:'用户管理',
          component:User
        },
        {
          path:'/organ/organ',
          name:'机构管理',
          component:Organ
        },
        {
          path:'/organ/area',
          name:'区域管理',
          component:Area
        },
        {
          path:'/system/menu',
          name:'菜单管理',
          component:Menu
        },
        {
          path:'/system/role',
          name:'角色管理',
          component:Role
        },
        {
          path:'/system/dict',
          name:'字典管理',
          component:Dict
        }
      ]
    },
    {
      path:'/tabs',
      name:'Tabs',
      component:Tabs
    },
    {
      path:'/login',
      name:'login',
      component:Login
    }

  ]
})
